import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/bmsuser/list',
    method: 'get',
    params: query
  })
}

export function fetchBMSUser(id) {
  return request({
    url: '/api/bmsuser/detail',
    method: 'get',
    params: { id }
  })
}

export function resetPassword(data) {
  return request({
    url: '/api/bmsuser/reset-password',
    method: 'post',
    data
  })
}

export function createBMSUser(data) {
  return request({
    url: '/api/bmsuser/create',
    method: 'post',
    data
  })
}

export function updateBMSUser(data) {
  return request({
    url: '/api/bmsuser/update',
    method: 'post',
    data
  })
}

export function deleteBMSUser(userId) {
  return request({
    url: '/api/bmsuser/delete/' + userId,
    method: 'post'
  })
}
